package com.ayu.gulimall.seckill.schedule;


import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

////开起异步
//@EnableAsync
////开启定时
//@EnableScheduling
@Slf4j
//@Component
public class HelloSchedule {


//    @Async
//    @Scheduled(cron = "* * * ? * 1")
    public void helloSche() throws InterruptedException {
        log.info("hello");
        Thread.sleep(3000);
    }
}
